class SystemBaiduIdentityCardResultModel {
  late WordsResult wordsResult;
  late int logId;
  late int wordsResultNum;
  late int idcardNumberType;
  late String imageStatus;

  SystemBaiduIdentityCardResultModel(
      {required this.wordsResult,
      required this.logId,
      required this.wordsResultNum,
      required this.idcardNumberType,
      required this.imageStatus});

  SystemBaiduIdentityCardResultModel.fromJson(Map<String, dynamic> json) {
    wordsResult = (json['words_result'] != null
        ? new WordsResult.fromJson(json['words_result'])
        : null)!;
    logId = json['log_id'];
    wordsResultNum = json['words_result_num'];
    idcardNumberType = json['idcard_number_type'];
    imageStatus = json['image_status'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.wordsResult != null) {
      data['words_result'] = this.wordsResult.toJson();
    }
    data['log_id'] = this.logId;
    data['words_result_num'] = this.wordsResultNum;
    data['idcard_number_type'] = this.idcardNumberType;
    data['image_status'] = this.imageStatus;
    return data;
  }
}

class WordsResult {
  late Name1 name1;
  late Name1 name2;
  late Name1 name3;
  late Name1 name4;
  late Name1 name5;
  late Name1 name6;

  WordsResult(
      {required this.name1,
      required this.name2,
      required this.name3,
      required this.name4,
      required this.name5,
      required this.name6});

  WordsResult.fromJson(Map<String, dynamic> json) {
    name1 = (json['姓名'] != null ? new Name1.fromJson(json['姓名']) : null)!;
    name2 = (json['民族'] != null ? new Name1.fromJson(json['民族']) : null)!;
    name3 = (json['住址'] != null ? new Name1.fromJson(json['住址']) : null)!;
    name4 =
        (json['公民身份号码'] != null ? new Name1.fromJson(json['公民身份号码']) : null)!;
    name5 = (json['出生'] != null ? new Name1.fromJson(json['出生']) : null)!;
    name6 = (json['性别'] != null ? new Name1.fromJson(json['性别']) : null)!;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.name1 != null) {
      data['姓名'] = this.name1.toJson();
    }
    if (this.name2 != null) {
      data['民族'] = this.name2.toJson();
    }
    if (this.name3 != null) {
      data['住址'] = this.name3.toJson();
    }
    if (this.name4 != null) {
      data['公民身份号码'] = this.name4.toJson();
    }
    if (this.name5 != null) {
      data['出生'] = this.name5.toJson();
    }
    if (this.name6 != null) {
      data['性别'] = this.name6.toJson();
    }
    return data;
  }
}

class Name1 {
  late String words;
  late Location location;

  Name1({required this.words, required this.location});

  Name1.fromJson(Map<String, dynamic> json) {
    words = json['words'];
    location = (json['location'] != null
        ? new Location.fromJson(json['location'])
        : null)!;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['words'] = this.words;
    if (this.location != null) {
      data['location'] = this.location.toJson();
    }
    return data;
  }
}

class Location {
  late int top;
  late int left;
  late int width;
  late int height;

  Location(
      {required this.top,
      required this.left,
      required this.width,
      required this.height});

  Location.fromJson(Map<String, dynamic> json) {
    top = json['top'];
    left = json['left'];
    width = json['width'];
    height = json['height'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['top'] = this.top;
    data['left'] = this.left;
    data['width'] = this.width;
    data['height'] = this.height;
    return data;
  }
}
